﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media.Media3D;

namespace Game3D
{
    [Serializable]
    class GameMeshGrid
    {
        /// <summary>
        /// Collection of the complete MeshGrid. 
        /// It is used to create a matrix where every block can be created with.
        /// </summary>
        /// 
        public static Point3DCollection MeshGrid = new Point3DCollection() 
            { 
                // ==== FRONTSIDE ====
                // Y 0 Z 0
                new Point3D(0 * GameConstants.BlockWidth, 0 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 0
                new Point3D(1 * GameConstants.BlockWidth, 0 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 1
                new Point3D(2 * GameConstants.BlockWidth, 0 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 2
                new Point3D(3 * GameConstants.BlockWidth, 0 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 3

                // Y 1 Z 0
                new Point3D(0 * GameConstants.BlockWidth, 1 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 4
                new Point3D(1 * GameConstants.BlockWidth, 1 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 5
                new Point3D(2 * GameConstants.BlockWidth, 1 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 6
                new Point3D(3 * GameConstants.BlockWidth, 1 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 7

                // Y 2 Z 0
                new Point3D(0 * GameConstants.BlockWidth, 2 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 8
                new Point3D(1 * GameConstants.BlockWidth, 2 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 9
                new Point3D(2 * GameConstants.BlockWidth, 2 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 10
                new Point3D(3 * GameConstants.BlockWidth, 2 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 11

                // Y 3 Z 0
                new Point3D(0 * GameConstants.BlockWidth, 3 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 12
                new Point3D(1 * GameConstants.BlockWidth, 3 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 13
                new Point3D(2 * GameConstants.BlockWidth, 3 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 14
                new Point3D(3 * GameConstants.BlockWidth, 3 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 15

                // Y 4 Z 0
                new Point3D(0 * GameConstants.BlockWidth, 4 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 16
                new Point3D(1 * GameConstants.BlockWidth, 4 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 17
                new Point3D(2 * GameConstants.BlockWidth, 4 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 18
                new Point3D(3 * GameConstants.BlockWidth, 4 * GameConstants.BlockHeight, 0 * GameConstants.BlockDepth), // IDX 19

                // ==== BACKSIDE ====

                // Y 0 Z -1
                new Point3D(0 * GameConstants.BlockWidth, 0 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 20
                new Point3D(1 * GameConstants.BlockWidth, 0 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 21
                new Point3D(2 * GameConstants.BlockWidth, 0 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 22
                new Point3D(3 * GameConstants.BlockWidth, 0 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 23

                // Y 1 Z -1
                new Point3D(0 * GameConstants.BlockWidth, 1 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 24
                new Point3D(1 * GameConstants.BlockWidth, 1 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 25
                new Point3D(2 * GameConstants.BlockWidth, 1 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 26
                new Point3D(3 * GameConstants.BlockWidth, 1 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 27

                // Y 2 Z -1
                new Point3D(0 * GameConstants.BlockWidth, 2 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 28
                new Point3D(1 * GameConstants.BlockWidth, 2 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 29
                new Point3D(2 * GameConstants.BlockWidth, 2 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 30
                new Point3D(3 * GameConstants.BlockWidth, 2 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 31

                // Y 3 Z -1
                new Point3D(0 * GameConstants.BlockWidth, 3 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 32
                new Point3D(1 * GameConstants.BlockWidth, 3 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 33
                new Point3D(2 * GameConstants.BlockWidth, 3 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 34
                new Point3D(3 * GameConstants.BlockWidth, 3 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 35

                // Y 4 Z -1
                new Point3D(0 * GameConstants.BlockWidth, 4 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 36
                new Point3D(1 * GameConstants.BlockWidth, 4 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 37
                new Point3D(2 * GameConstants.BlockWidth, 4 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 38
                new Point3D(3 * GameConstants.BlockWidth, 4 * GameConstants.BlockHeight, 1 * GameConstants.BlockDepth), // IDX 39
            };
    }
}
